package day0725;

import java.util.Arrays;

public class Test16 {
    public static void main(String[] args) {
        int[]   a =    { 1, 2, 3, 4, 5 };
        print(a);//将a变量中保存的数组地址 复制到print方法的参数b中了
        System.out.println(a[4]);//?10
        System.out.println(Arrays.toString(a));
    }

    public static void print(int[] b) {
        for (int i = 0; i < b.length; i++) {
            b[i]=b[i]*2;
        }
        System.out.println(Arrays.toString(b));//?10
    }
}
